import request from '@/utils/request'

const apiUrl="/common/account"
// 查询往来账列表
export function pageAccount(query) {
  return request({
    url: apiUrl+'/page',
    method: 'get',
    params: query
  })
}

// 查询往来账详细
export function getAccount(id) {
  return request({
    url: apiUrl+'/' + id,
    method: 'get'
  })
}

// 新增往来账
export function addAccount(data) {
  return request({
    url: apiUrl+'',
    method: 'post',
    data: data
  })
}

// 修改往来账
export function updateAccount(data) {
  return request({
    url: apiUrl+'',
    method: 'put',
    data: data
  })
}

// 删除往来账
export function delAccount(id) {
  return request({
    url: apiUrl+'/' + id,
    method: 'delete'
  })
}

